const mongoose = require('mongoose')

const Schema  = mongoose.Schema
// 空间点赞表
const SpaceLikeType = {
    userId: { type: Schema.Types.ObjectId, ref: 'user' },  // 用户id
    spaceId: { type: Schema.Types.ObjectId, ref: 'space' }, // 说说id
    isLike: Boolean // 是否点赞
}

const SpaceLikeModel = mongoose.model('space_like', new Schema(SpaceLikeType))

module.exports = SpaceLikeModel